package cmd

import (
	"fmt"
	"github.com/spf13/cobra"
)

var vers, useSSL bool
var (
	BucketName, AccessKeyID, SecretAccessKey, EndpointUrl, PathDir, ConfType, ConfFile, Format, Schema, FilePath string
)

// 程序的启动时，组装都在这里运行
// RootCmd represents the start command
var RootCmd = &cobra.Command{
	//Use:   "start",
	//Short: "启动 builder后端API服务",
	//Long:  `启动 builder后端API服务`,
	Use:   "builder",
	Short: "builder [install/minio]",
	Long:  `Using the builder command, you can upload files to minio, you can install middleware rpm packages, and so on `,
	RunE: func(cmd *cobra.Command, args []string) error {
		if vers {
			fmt.Println("builder:v0.0.1")
			return nil
		}
		return nil
	},
}

func init() {
	RootCmd.PersistentFlags().BoolVarP(&vers, "version", "v", false, "print builder api version")
}
